package cn.mystylefree.designpatternsdemo.builder;

/**
 * @program my-project-model
 * @description:
 * @author: lee
 * @create: 2022/07/19 08:59
 */
public class ComputerBuilder {

    private Computer computer=new Computer();
    public void installDisplayer(String displayer) {
        computer.setDisplayer(displayer);
    }

    public void installMainUnit(String mainUnit) {
        computer.setMainUnit(mainUnit);
    }
    public void installMouse(String displayer) {
        computer.setMouse(displayer);
    }
    public void installKeybord(String keybord) {
        computer.setKeyboard(keybord);
    }

    public Computer getComputer(){
        return computer;
    }



//    private ComputerBuilder target = new ComputerBuilder();
//
//    public Builder installDisplayer(String displayer) {
//        target.setDisplayer(displayer);
//        return this;
//    }
//
//    public Builder installMainUnit(String mainUnit) {
//        target.setMainUnit(mainUnit);
//        return this;
//    }
//
//    public Builder installMouse(String mouse) {
//        target.setMouse(mouse);
//        return this;
//    }
//
//    public Builder installKeybord(String keyboard) {
//        target.setKeyboard(keyboard);
//        return this;
//    }
//
//    public ComputerBuilder build() {
//        return target;
//    }
}
